﻿using System;
using System.ComponentModel.DataAnnotations;
using System.Runtime.Serialization;
using IterationLife.Domains.Sports.Enums;
using Util.Applications;

namespace IterationLife.Football.MTSports.Dtos.Sports {
    /// <summary>
    /// SportUsers数据传输对象
    /// </summary>
    [DataContract]
    public class SportUserDto : DtoBase {
        /// <summary>
        /// 合作方用户Id
        /// </summary>
        [Required(ErrorMessage = "合作方用户Id不能为空")]
        [StringLength( 200, ErrorMessage = "合作方用户Id输入过长，不能超过200位" )]
        [Display( Name = "合作方用户Id" )]
        [DataMember]
        public string PartnerUserId { get; set; }
        
        /// <summary>
        /// 身份标示
        /// </summary>
        [StringLength( 500, ErrorMessage = "身份标示输入过长，不能超过500位" )]
        [Display( Name = "身份标示" )]
        [DataMember]
        public string Token { get; set; }
        
        /// <summary>
        /// 手机号
        /// </summary>
        [StringLength( 50, ErrorMessage = "手机号输入过长，不能超过50位" )]
        [Display( Name = "手机号" )]
        [DataMember]
        public string Mobile { get; set; }

        /// <summary>
        /// 头像
        /// </summary>
        [StringLength(500, ErrorMessage = "头像输入过长，不能超过500位")]
        [Display(Name = "头像")]
        [DataMember]
        public string Photo { get; set; }

        /// <summary>
        /// 设备
        /// </summary>
        [Required(ErrorMessage = "设备不能为空")]
        [Display( Name = "设备" )]
        [DataMember]
        public EquipmentType EquipmentType { get; set; }
        
        /// <summary>
        /// 创建时间
        /// </summary>
        [Display( Name = "创建时间" )]
        [DataMember]
        public DateTime? CreationTime { get; set; }
        
        /// <summary>
        /// 创建人
        /// </summary>
        [Display( Name = "创建人" )]
        [DataMember]
        public Guid? CreatorId { get; set; }
        
        /// <summary>
        /// 最后修改时间
        /// </summary>
        [Display( Name = "最后修改时间" )]
        [DataMember]
        public DateTime? LastModificationTime { get; set; }
        
        /// <summary>
        /// 最后修改人
        /// </summary>
        [Display( Name = "最后修改人" )]
        [DataMember]
        public Guid? LastModifierId { get; set; }
        
        /// <summary>
        /// 是否删除
        /// </summary>
        [Required(ErrorMessage = "是否删除不能为空")]
        [Display( Name = "是否删除" )]
        [DataMember]
        public bool IsDeleted { get; set; }
        
        /// <summary>
        /// 版本号
        /// </summary>
        [Display( Name = "版本号" )]
        [DataMember]
        public Byte[] Version { get; set; }
        
        /// <summary>
        /// 输出SportUsers状态
        /// </summary>
        public override string ToString() {
            return this.ToEntity().ToString();
        }
    }
}
